﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Public;
using DAL;
using System.Data;

namespace BUL
{
    public class PayTransactionBUL
    {
        PayTransactionDAL cls = new PayTransactionDAL();
        public DataTable CheckCard(string cardId)
        {
            return cls.CheckCard(cardId);
        }

        public DataTable getCustomer(string cardId)
        {
            return cls.getCustomer(cardId);
        }

        public DataTable getScore(string cardId)
        {
            return cls.getScore(cardId);
        }

        public DataTable getProductName(string inputedBarcode)
        {
            return cls.getProductName(inputedBarcode);
        }

        //ham lay product id do len gridview nhung bi invisible
        public DataTable getProductId(string inputedBarcode)
        {
            return cls.getProductId(inputedBarcode);
        }

        public DataTable getUnitPrice(string inputedBarcode)
        {
            return cls.getUnitPrice(inputedBarcode);
        }

        public int AddInvoice(Invoice invoice)
        {
            return cls.AddInvoice(invoice);
        }

        public int AddPurchasing(Purchasing purchasing)
        {
            return cls.AddPurchasing(purchasing);
        }
        public DataTable getMaxInvoiceId(string inputedCashierId)
        {
            return cls.getMaxInvoiceId(inputedCashierId);
        }

        public int UpdateScore(LoyaltyCard loyaltyCard)
        {
            return cls.UpdateScore(loyaltyCard);

        }

        public int UpdateQuantity(Product product)
        {
            return cls.UpdateQuantity(product);
        }
    }
}
